Conversation
nateprewitt
reviewed
Feb 6, 2023
|
|
||
| def test_epoch_seconds_to_datetime_with_overflow_error(monkeypatch): | ||
| # Emulate the Year 2038 problem by always raising an OverflowError. | ||
| # epoch_seconds_to_datetime() must avoid the |
Contributor
There was a problem hiding this comment.
It seems like this comment
Contributor
Author
There was a problem hiding this comment.
The usual outcome of overthinking a code comment while the clock is ticking down to the daily standup meeting...
jonemo
commented
Feb 6, 2023
Comment on lines
+14
to
+15
| # mypy: allow-untyped-defs | ||
| # mypy: allow-incomplete-defs |
Contributor
Author
There was a problem hiding this comment.
To date, this is the best solution we have for test files that include pytest fixtures.
jonemo
commented
Feb 6, 2023
| @@ -1,13 +1,31 @@ | |||
| # Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |||
Contributor
Author
There was a problem hiding this comment.
To preempt the usual comment: I know, it's 2023. This notice should have been added here in 2022 when the file was first created, so backdating it.
JordonPhillips
approved these changes
Feb 13, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This addresses an unhandled
OverflowErrorthat can occur on 32-bit systems due to the Year 2038 problem or with negative timestamps. I became aware of this from a (currently unresolved) cluster of botocore issue and past attempts at mitigation:By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.